<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>
        let name = 'aa'
        let age = 88;
        let json = {
            name, // name: name,
            age, // age: age
            show: function() {
                return this.name
            }
        }
        console.log(json.show()); // aa
        console.log(json); //{name: "aa", age: 88, show: ƒ}
    </script>

</body>

</html>